]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
extensionSystem: Remove custom CA file handling
authorJasper St. Pierre <jstpierre@mecheye.net>
Thu, 24 May 2012 16:23:18 +0000 (12:23 -0400)
committerJasper St. Pierre <jstpierre@mecheye.net>
Fri, 25 May 2012 22:25:51 +0000 (18:25 -0400)
libsoup (well, glib-networking) now handles this automatically

https://bugzilla.gnome.org/show_bug.cgi?id=676837

configure.ac
js/misc/config.js.in
js/ui/extensionSystem.js

index 3951c662c25d84e54f19595b263438b9d8a675e3..e4cdab13ec0095ea834b41d85cb42b75a2465eea 100644 (file)
@@ -237,31 +237,6 @@ AC_ARG_ENABLE(jhbuild-wrapper-script,
   AS_HELP_STRING([--enable-jhbuild-wrapper-script],[Make "gnome-shell" script work for jhbuild]),,enable_jhbuild_wrapper_script=no)
 AM_CONDITIONAL(USE_JHBUILD_WRAPPER_SCRIPT, test "x$enable_jhbuild_wrapper_script" = xyes)
 
-AC_MSG_CHECKING([location of system Certificate Authority list])
-AC_ARG_WITH(ca-certificates,
-            [AC_HELP_STRING([--with-ca-certificates=@<:@path@:>@],
-                            [path to system Certificate Authority list])])
-
-if test "$with_ca_certificates" = "no"; then
-    AC_MSG_RESULT([disabled])
-else
-    if test -z "$with_ca_certificates"; then
-        for f in /etc/pki/tls/certs/ca-bundle.crt \
-                 /etc/ssl/certs/ca-certificates.crt; do
-             if test -f "$f"; then
-                with_ca_certificates="$f"
-             fi
-        done
-        if test -z "$with_ca_certificates"; then
-            AC_MSG_ERROR([could not find. Use --with-ca-certificates=path to set, or --without-ca-certificates to disable])
-        fi
-   fi
-
-   AC_MSG_RESULT($with_ca_certificates)
-   AC_DEFINE_UNQUOTED(SHELL_SYSTEM_CA_FILE, ["$with_ca_certificates"], [The system TLS CA list])
-fi
-AC_SUBST(SHELL_SYSTEM_CA_FILE,["$with_ca_certificates"])
-
 BROWSER_PLUGIN_DIR="${BROWSER_PLUGIN_DIR:-"\${libdir}/mozilla/plugins"}"
 AC_ARG_VAR([BROWSER_PLUGIN_DIR],[Where to install the plugin to])
 
index 4a0db16a4ee3f3e16245dd5a23701579781df755..4326686746583dda8be416fddead04050ac81d31 100644 (file)
@@ -8,8 +8,6 @@ const PACKAGE_VERSION = '@PACKAGE_VERSION@';
 const GJS_VERSION = '@GJS_VERSION@';
 /* 1 if gnome-bluetooth is available, 0 otherwise */
 const HAVE_BLUETOOTH = @HAVE_BLUETOOTH@;
-/* The system TLS CA list */
-const SHELL_SYSTEM_CA_FILE = '@SHELL_SYSTEM_CA_FILE@';
 /* gettext package */
 const GETTEXT_PACKAGE = '@GETTEXT_PACKAGE@';
 /* locale dir */
index abd9551c03b3ebfaf38a5697f73d6c0ae3400d75..2f2b423e984766cad736f50cbc77a1499d981ce2 100644 (file)
@@ -34,7 +34,7 @@ const REPOSITORY_URL_BASE = 'https://extensions.gnome.org';
 const REPOSITORY_URL_DOWNLOAD = REPOSITORY_URL_BASE + '/download-extension/%s.shell-extension.zip';
 const REPOSITORY_URL_INFO =     REPOSITORY_URL_BASE + '/extension-info/';
 
-const _httpSession = new Soup.SessionAsync();
+const _httpSession = new Soup.SessionAsync({ ssl_use_system_ca_file: true });
 
 // The unfortunate state of gjs, gobject-introspection and libsoup
 // means that I have to do a hack to add a feature.
@@ -43,16 +43,6 @@ const _httpSession = new Soup.SessionAsync();
 if (Soup.Session.prototype.add_feature != null)
     Soup.Session.prototype.add_feature.call(_httpSession, new Soup.ProxyResolverDefault());
 
-function _getCertFile() {
-    let localCert = GLib.build_filenamev([global.userdatadir, 'extensions.gnome.org.crt']);
-    if (GLib.file_test(localCert, GLib.FileTest.EXISTS))
-        return localCert;
-    else
-        return Config.SHELL_SYSTEM_CA_FILE;
-}
-
-_httpSession.ssl_ca_file = _getCertFile();
-
 // Arrays of uuids
 var enabledExtensions;
 // Contains the order that extensions were enabled in.